package com.wandian.audio.mvvm.audiorankactivity;

import android.os.Bundle;

import androidx.databinding.DataBindingUtil;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mylib.libcore.config.RouterConfig;
import com.mylib.libcore.mvvm.BaseMVVMActivity;
import com.mylib.libcore.utils.ActivityUtil;
import com.wandian.audio.R;
import com.wandian.audio.adapter.AudioDJTopRecycleAdapter;
import com.wandian.audio.databinding.AudioActivityRankBinding;

/**
 * @author Administrator
 * @date 2019/12/18-14:28
 * @description DJ排行榜activity
 **/
@Route(path = RouterConfig.ROUTER_ACTIVITY_AUDIO_RANK)
public class AudioRankActivity extends BaseMVVMActivity<AudioRankActivityViewModel> {
    private AudioActivityRankBinding dataBinding;
    private AudioDJTopRecycleAdapter audioRankRecycleAdapter;
    @Override
    public void init(Bundle savedInstanceState) {
        dataBinding = DataBindingUtil.setContentView(this, R.layout.audio_activity_rank);
        dataBinding.setLifecycleOwner(this);
        dataBinding.setViewModel(mViewModel);

        initViewData();
        initClink();

    }


    private void initViewData(){
        ActivityUtil.getInstance().showStatusView(this,dataBinding.viewSysTop,true);
        dataBinding.bindTransparentToolBar.toolBarTvTitle.setText("音乐天地");

    }

    private void initClink(){
        dataBinding.bindTransparentToolBar.toolBarIvBack.setOnClickListener(v -> finish());
        dataBinding.tvMusicSinger.setOnClickListener(v -> ARouter.getInstance().build(RouterConfig.ROUTER_ACTIVITY_AUDIO_SINGER).navigation() );
        dataBinding.tvMusicRank.setOnClickListener(v ->ARouter.getInstance().build(RouterConfig.ROUTER_ACTIVITY_AUDIO_TOP_RANK).navigation());
        dataBinding.tvMusicDj.setOnClickListener(v ->ARouter.getInstance().build(RouterConfig.ROUTER_ACTIVITY_AUDIO_DJ).navigation());
        dataBinding.tvMusicLocal.setOnClickListener(v ->ARouter.getInstance().build(RouterConfig.ROUTER_ACTIVITY_AUDIO_LOCAL).navigation());
    }




}
